<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Div闪烁</title>
<style type="text/css">
    body{
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
/*@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution: .001dpcm) {*/
.masked{
    font-size: 66px;
    background-image: -webkit-linear-gradient(right, red, yellow 25%, blue 50%, pink 75%, blueviolet);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    -webkit-background-size: 200% 100%;
    -webkit-animation: masked-animation 4s linear infinite ;
}
/*}*/
@-webkit-keyframes masked-animation {
0%  { background-position: 0 0;}
100% { background-position: 100% 0;}
}
</style>
</head>
<body>
<div class="masked">
    <h4>这是一段可选文字测试,这是一段可选文字测试，这是一段可选文字测试？这是一段可选文字测试</h4>
    <span class="sp">hellow word</span>
    <div id="test"></div>
</div>
<script>
    Array.prototype.unique2 = function(){
        this.sort(); //先排序
        var res = [this[0]];
        for(var i = 1; i < this.length; i++){
            if(this[i] !== res[res.length - 1]){
                res.push(this[i]);
            }
        }
        return res;
    }
    var arr = [1, 'a', 'a', 'b', 'd', 'e', 'e', 1, 0];
    alert(arr.unique2());




</script>
</body>
</html>
